g_hash_table_destroy (self->loose_object_devino_hash);
if (self->config)
g_key_file_free (self->config);
- ot_clear_ptrarray (&self->cached_meta_indexes);
- ot_clear_ptrarray (&self->cached_content_indexes);
+ g_clear_pointer (&self->cached_meta_indexes, (GDestroyNotify) g_ptr_array_unref);
+ g_clear_pointer (&self->cached_content_indexes, (GDestroyNotify) g_ptr_array_unref);
g_hash_table_destroy (self->cached_pack_index_mappings);
g_hash_table_destroy (self->cached_pack_data_mappings);
g_mutex_clear (&self->cache_lock);
GVariantBuilder *meta_index_content_builder = NULL;
GVariantBuilder *data_index_content_builder = NULL;
- ot_clear_ptrarray (&self->cached_meta_indexes);
- ot_clear_ptrarray (&self->cached_content_indexes);
+ g_clear_pointer (&self->cached_meta_indexes, (GDestroyNotify) g_ptr_array_unref);
+ g_clear_pointer (&self->cached_content_indexes, (GDestroyNotify) g_ptr_array_unref);
superindex_path = g_file_get_child (self->pack_dir, "index");
- ot_clear_ptrarray (&pack_indexes);
+ g_clear_pointer (&pack_indexes, (GDestroyNotify) g_ptr_array_unref);
if (!list_pack_indexes_from_dir (self, TRUE, &pack_indexes,
cancellable, error))
goto out;
cancellable, error))
goto out;
- ot_clear_ptrarray (&pack_indexes);
+ g_clear_pointer (&pack_indexes, (GDestroyNotify) g_ptr_array_unref);
if (!list_pack_indexes_from_dir (self, FALSE, &pack_indexes,
cancellable, error))
goto out;
goto out;
}
- ot_clear_ptrarray (&data_files);
+ g_clear_pointer (&data_files, (GDestroyNotify) g_ptr_array_unref);
if (!list_files_in_dir_matching (cache_path,
"ostdatapack-", ".data",
&data_files,
if (pull_data->base_uri)
soup_uri_free (pull_data->base_uri);
ot_clear_hashtable (&pull_data->file_checksums_to_fetch);
- ot_clear_ptrarray (&pull_data->cached_meta_pack_indexes);
- ot_clear_ptrarray (&pull_data->cached_data_pack_indexes);
+ g_clear_pointer (&pull_data->cached_meta_pack_indexes, (GDestroyNotify) g_ptr_array_unref);
+ g_clear_pointer (&pull_data->cached_data_pack_indexes, (GDestroyNotify) g_ptr_array_unref);
if (summary_uri)
soup_uri_free (summary_uri);
return ret;